fixed some tests + some bugs :)