Fixed several things