forcing padding to 0 when eof/bof is hit