fix fromworkspace function in controller