some fixes, now it works