Fixed #1126.
Fix #1128 by Alex300
Fixed datetime fields reset bug, closed #1131
Fixes for PM module by Alex300, see #1132