Use binding middleware
Fix #572