Prevent infinite loop