fix currSize bug and maxTime bugs