fixed javascript error with blocks layouts