added bugfixes for 0.8