Fixed some issue with persistance