Fixed various bugs, notice where anomalies are