Major fixes

Fixed some important bugs with variables and missing dlls