bug: referencing previously removed function