casting structs and mod by 0