Fix in_pocket logic to avoid possible issues

Signed-off-by: torrented <wallace.ryan10@gmail.com>