Bugfixes and import old prg