Change the casting checking to look better