Fixed more Object to Long conversion problems.