Made source code compatible with R15