fixed issue with non-blocking