bug fixes to get full functionality working

Some bugfixes to get other events like boluses and basals working