Fixed the 100% CPU utilization bug and replaced the bool() cast operator...

... for data by empty()