Fixing some little bugs