Consider reading these blocked flags into local booleans so you don't have to keep calling these functions (and avoid possibility that function returns different value in subsequent call).
Consider reading these blocked flags into local booleans so you don't have to keep calling these functions (and avoid possibility that function returns different value in subsequent call).