Added unsatisfactory test and fixed a few things