fix cast to Long.valueOf