fix drop function