Fixed Cast and added Try parsing