fixes var errors