Fixed few tiny bugs