#4137 Tidy entity persistor
#4137 Fix build