Fixed 5.1.1 compatibility issue