fixed bug with bool not initialized