Fixed some minor bugs. Including:
- Broken queries when using child fields to query
- Broken images when gd was not installed. Need to replace this with a standard PNG to show the user the error.