An employee was closing a loaded a trailer and activated the dock leveler control panel to retract the lip of the leveler. The lip did not fully retract and the employee attempted to pull the lip into the retracted position manually. The lip then extended, catching the employee's right middle finger and crushing it.