Removed some unneeded code
Handle empty spectrum events