fix long valeof to int bug