Fixes #72 and #73 EF related issues