fixes hang with railcraft, #270