Fixed a few issues with planning