Fixing bugs here and there