Fix energy calculation when fixed nodes exist; Fix bug in kernel.start()