Fixed Andrew's code after updating GLib

@angangg why is this in a separate class as opposed to Ship itself?