Fixing random bug