Improved a bit overtime logic