fixed some issues with level file handling