Faster int cast
Remove useless $app argument
Merge branch '4.2'