bugfixes. working now.