fixed bug caused by stupid programs, also other stuff