Fixed a few issues with backward compatibility with R15