fixed bugs/errors