diff --git a/core/vm/evm.go b/core/vm/evm.go
index caf8b4507d15d779dabfa96f4d4b1407320ba737..495d9beea140dd2cf3fb132d7277b26eedfefc4a 100644
--- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -336,7 +336,7 @@ func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.I
 
 	ret, err = run(evm, snapshot, contract, nil)
 	// check whether the max code size has been exceeded
-	maxCodeSizeExceeded := len(ret) > params.MaxCodeSize
+	maxCodeSizeExceeded := evm.ChainConfig().IsEIP158(evm.BlockNumber) && len(ret) > params.MaxCodeSize
 	// if the contract creation ran successfully and no errors were returned
 	// calculate the gas required to store the code. If the code could not
 	// be stored due to not enough gas set an error and let it be handled
diff --git a/tests/state_test.go b/tests/state_test.go
index 3d7b29012e2101253d31af0118300cfc0d570fab..4b6ba8b31bd5655eeb562590a2869910e80189ea 100644
--- a/tests/state_test.go
+++ b/tests/state_test.go
@@ -35,8 +35,6 @@ func TestState(t *testing.T) {
 	st.skipLoad(`^stTransactionTest/OverflowGasRequire\.json`) // gasLimit > 256 bits
 	st.skipLoad(`^stTransactionTest/zeroSigTransa[^/]*\.json`) // EIP-86 is not supported yet
 	// Expected failures:
-	st.fails(`^stCodeSizeLimit/codesizeOOGInvalidSize\.json/(Frontier|Homestead|EIP150)`,
-		"code size limit implementation is not conditional on fork")
 	st.fails(`^stRevertTest/RevertPrecompiledTouch\.json/EIP158`, "bug in test")
 	st.fails(`^stRevertTest/RevertPrefoundEmptyOOG\.json/EIP158`, "bug in test")
 	st.fails(`^stRevertTest/RevertPrecompiledTouch\.json/Byzantium`, "bug in test")