Code validation fixes