Fixed getSize function.