fixed bug that resulted in a floating point error, various updates