non terminating error with type conversion from long to int64
counting on implicit casting in POSH