Fix errors in gdm3 script

closes #1