fixed IP conversion at model. Applied ip2long at ip address before inserting to database.