fix #92 & fix for negative at midnight