Working on some bugs