bugfixes (still buggy)