Fixed Daily History graphs

Simple fix that should display history graphs + migration script to remove old faulty values.