extract() bug workaround