Updated to comply with recent libgdx changes.
Merge