Tried to fix PHP notice errors without a success. :(