Fixed a bug with GC calculation