Random bug fixes here and there