improving assert in lib2patches