Check $_GET to avoid js error

Please merger only commit 72b056a65c1cd19b9039b33a5bbf8c4594d4944d
It adds isset() check for $_GET parameters to avoid js error.