This incident was caused by a poorly prepared stow plan resulting in the vessel having negative stability upon completion of loading. The onboard calculations were incorrectly executed, as they appear not to have taken the effects of free surface into account, so masking the true stability condition of the vessel.