fixed bugs due to differences between versions