Added in yukinoraru's fixes