changed train controller casts just in case