error/minor functionality fixes