adaptations from gquest
gquest bug fix
missing files