Fixing bugs, hopefully