fix #92 & fix for negative at midnight
Merge branch 'edge' into dev