Fixed Ping error.
Added constraints on write