Fixed various small issues