Fixes to cake integration