fixed bug in RPA energy calculation