fixed a bug where an int was expected but a double received