Fixed some more bugs (still some left..)