Fixed problem with algorithm in doStep() of TakeResourceAction