Added cast() to convert integers properly.