Removed bad casting