fixed bug with nil class