Changes to handle data properly