fix end of file problem in mono

it throws error end of file  in mono on mac- this is to fix the problem