Fixed several error's