bugfix
rework rebar to use gen_server