fix general bugs