fixed bug with post names that contain numbers and added check for empty