Reorder require
Fix test
Fix check