Fix bug in buildbug script