fixed #173, Integer cannot be cast as Double