fixed missing dependency
fixed middleware