fixes #6268 Blank entries creating every time

Fixed the issue and pushed the code for review, please check it.