Fix issue #81 for gravity handling in initialization

issue #81