Fixed the issue with doubles