Added logic smooth for different platforms.