bugfixes but still bugged