Create a test
Fix some bugs