even more bug fixing