Changing primapps to handle doubles correctly