Hopefully fixed integer casting