Fixes for using Math lib