fixed issue with initial caluclations.