fix middleware
release 0.5.2