fix bug ceil is undefined