Fixed error and changed a few things