Fixed getDouble() function