Switched from bool to mutex