Added the fixes I accidentaly deleted yesterday