Fixed bug that caused wrong dimensions if width or height was an integer, not a float