code validation fixes