Stake Fix

fixed staking issue due to use of while instead of if -_-