Made plugin work with version 1-2 of HAPI - add back required() support