fix #115 and change property callback to middleware
merge remote master