Fixed bug if H is not integer